package com.project.service.impl;

import com.project.bean.CutPageBean;
import com.project.bean.StudentBean;
import com.project.dao.IStudentDao;
import com.project.dao.impl.StudentDaoImpl;
import com.project.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements IStudentService {
    @Autowired
    private IStudentDao dao ;
    @Override
    public CutPageBean<StudentBean> findByItem(Integer pageNo, String name, String className, String room) {
        return dao.findByItem(pageNo,name,className, room );
    }

    @Override
    public StudentBean findById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public void updateRoom(Integer id, Integer roomId) {
         dao.updateRoom(id,roomId);
    }

    @Override
    public void del(Integer id) {
         dao.del(id);
    }

    @Override
    public void add(StudentBean student) {
         dao.add(student);
    }
}
